package nl.boelen.game.net.packet;

public class Packet12Request extends Packet {

    private static final int packetNumber = 12;
    private String fromUniqueKey;
    private String needUniqueKey;

    public Packet12Request(byte[] data) {
        super(packetNumber);
        String[] datas = (readData(data)).split(":");
        this.fromUniqueKey = datas[0];
        this.needUniqueKey = datas[1];
    }

    public Packet12Request(String fromUniqueKey, String needUniqueKey) {
        super(packetNumber);
        this.fromUniqueKey = fromUniqueKey;
        this.needUniqueKey = needUniqueKey;
    }

    @Override
    public byte[] getData() {
        return (packetNumber + this.fromUniqueKey + ":" + this.needUniqueKey).getBytes();
    }

    public String getFromUniqueKey() {
        return fromUniqueKey;
    }

    public String getNeedUniqueKey() {
        return needUniqueKey;
    }
}
